<%--
  Created by IntelliJ IDEA.
  User: 12700
  Date: 2025/9/3
  Time: 13:38
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>物流员中心</title>
    <link rel="stylesheet" href="../../css/couriers1.css">
    <script type="text/javascript" src="../../js/jquery-1.8.3.js"></script>
    <script type="text/javascript">
        $(document).ready(function () {
            var username = localStorage.getItem('savedUsername');
            $("<img src='../../images/touxiang.png'><p>"+username+"</p>").appendTo(".admincontroller");
            $("[value='提交']").click(function () {
                var id = new URLSearchParams(window.location.search).get("id");
                var name = $("#name").val();
                var phone = $("#phone").val();
                var current_packages = $("#current_packages").val();
                var completed_packages = $("#completed_packages").val();
                $.get("../../couriers/update",{"id":id,"name":name,"phone":phone,"current_packages":current_packages,"completed_packages":completed_packages},function (b) {
                    if(b){
                        alert("修改成功！");
                        window.location.href="Couriers.jsp";
                    }else{
                        alert("修改失败！");
                        window.location.href="Couriers.jsp";
                    };
                });
            });
            $("[value='退出登录']").click(function () {
                window.location.href="../../index.jsp";
            });
        });
    </script>
</head>
<body>
<div class="head">
    <div class="icon"><img src="../../images/logo.png"></div>
    <div class="admin">
        <div class="admincontroller"></div>
        <div class="adminshow">
            <div><b>个人中心</b></div>
            <div><b>更多通知</b></div>
            <div><input type="button" value="退出登录"></div>
        </div>
    </div>
</div>
<div class="body">
    <div class="body-left">
        <img src="../../images/adv.jpg">
    </div>
    <div class="body-right">
        <div class="label">
            <div class="label-bar">
                <a href="Couriers.jsp"><div class="selected">物流员信息管理</div></a>
                <a href="couriersstatus.jsp"><div class="unselected">配送任务管理</div></a>
                <a href="couriersranking.jsp"><div class="unselected">绩效统计</div></a>
            </div>
            <div class="label-top">
                <div class="top-head"><b>新增物流员</b></div>
            </div>
            <div class="label-bot">
                <div class="bottom-left">

                </div>
                <div class="bottom-right">
                    <p>物流员姓名:</p>
                    <input type="text" id="name">
                    <p>电话号:</p>
                    <input type="text" id="phone">
                    <p>当前配送包裹数:</p>
                    <input type="text" id="current_packages">
                    <p>已完成包裹数:</p>
                    <input type="text" id="completed_packages">
                    <input type="button" value="提交">
                </div>
            </div>
        </div>
    </div>
</div>
</body>
</html>
